<!DOCTYPE html>
<html>
<head>
	<title>11</title>
	<script type="text/javascript" src="/js/jquery.js"></script>
	<script src="https://cuikangjie.github.io/JsonExportExcel/dist/JsonExportExcel.min.js"></script>
</head>
<body>
<button id="daochu" onclick="alertMsg()">导出</button>

<script type="text/javascript">
function alertMsg() {
	$.get("/individual/phpexcel", function(res){
		res = JSON.parse(res);
	    var option={};
		option.fileName = 'excel'
		option.datas=[
		  {
		    sheetData:res.data,
		    sheetName:'sheet',
		    // sheetFilter:['two','one'],
		    sheetHeader: res.label
		  },
		];
		var toExcel=new ExportJsonExcel(option);
		toExcel.saveExcel();
	});
}
</script>
</body>
</html>